<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The COMPersistHelper class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="variant.construct.html">« variant::__construct</a></li>
      <li style="float: right;"><a href="compersisthelper.construct.html">COMPersistHelper::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.com.html">COM</a></li>
    <li>The COMPersistHelper class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.compersisthelper" class="reference">

 <h1 class="title">The COMPersistHelper class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5, PHP 7, PHP 8)</p>


  <div class="section" id="compersisthelper.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    <span class="classname"><strong class="classname">COMPersistHelper</strong></span> improves the interoperability of <abbr>COM</abbr>
    and <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> with regard to the <var class="filename">php.ini</var> directive <a href="ini.core.html#ini.open-basedir" class="link">open_basedir</a>,
    and stream <a href="language.types.resource.html" class="link">资源(resource)</a>s.
   </p>
  </div>


  <div class="section" id="compersisthelper.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">final</span>
      <span class="modifier">class</span> <strong class="classname">COMPersistHelper</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type"><a href="class.variant.html" class="type variant">variant</a></span><span class="type"></span></span> <code class="parameter">$variant</code><span class="initializer"> = <strong><code>null</code></strong></span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.getcurfilename.html" class="methodname">GetCurFileName</a></span>(): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.getmaxstreamsize.html" class="methodname">GetMaxStreamSize</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.initnew.html" class="methodname">InitNew</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.loadfromfile.html" class="methodname">LoadFromFile</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.loadfromstream.html" class="methodname">LoadFromStream</a></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$stream</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.savetofile.html" class="methodname">SaveToFile</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$remember</code><span class="initializer"> = <strong><code>true</code></strong></span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="compersisthelper.savetostream.html" class="methodname">SaveToStream</a></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$stream</code></span>): <span class="type">bool</span></div>

   }</div>


  </div>

 </div>

 

















































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="compersisthelper.construct.html">COMPersistHelper::__construct</a> — Construct a COMPersistHelper object</li><li><a href="compersisthelper.getcurfilename.html">COMPersistHelper::GetCurFileName</a> — Get current filename</li><li><a href="compersisthelper.getmaxstreamsize.html">COMPersistHelper::GetMaxStreamSize</a> — Get maximum stream size</li><li><a href="compersisthelper.initnew.html">COMPersistHelper::InitNew</a> — Initialize object to default state</li><li><a href="compersisthelper.loadfromfile.html">COMPersistHelper::LoadFromFile</a> — Load object from file</li><li><a href="compersisthelper.loadfromstream.html">COMPersistHelper::LoadFromStream</a> — Load object from stream</li><li><a href="compersisthelper.savetofile.html">COMPersistHelper::SaveToFile</a> — Save object to file</li><li><a href="compersisthelper.savetostream.html">COMPersistHelper::SaveToStream</a> — Save object to stream</li></ul>
</div>
</div></div></body></html>